const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const config = {
    mode:'development',
    entry:{
        entry: './src/main.js'
    },
    output:{
        path: path.resolve(__dirname,'dist'),
        filename: 'index.js'
    },
    module:{
        rules:[
            {
                test: /\.js$/,
                loader: 'babel-loader',
                exclude: /mode_modules/
            }
        ]
    },
    plugins:[
        new HtmlWebpackPlugin({
            template: 'index.html'
        })
    ]
}

module.exports = config;

config.devServer = {
    host: '0.0.0.0',
    port: 8088,
    compress: true
}

